Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
update-electron-app
Advanced tools
A drop-in module that adds autoUpdating capabilities to Electron apps
A drop-in module that adds autoUpdating capabilities to Electron apps
Powered by the free and open-source update.electronjs.org service.
Before using this module, make sure your Electron app meets these criteria:
npm i update-electron-app
Drop this anywhere in your main process:
require('update-electron-app')()
That's it! Here's what happens by default:
package.json
file.ready
event; the module figures that out.You can also specify custom options:
require('update-electron-app')({
repo: 'github-user/repo',
updateInterval: '1 hour',
logger: require('electron-log')
})
update(options)
Options:
repo
String (optional) - A GitHub repository in the format owner/repo
. Defaults to your package.json
's "repository"
fieldhost
String (optional) - Defaults to https://update.electronjs.org
updateInterval
String (optional) - How frequently to check for updates. Defaults to 10 minutes
. Minimum allowed interval is 5 minutes
.logger
Object (optional) - A custom logger object that defines a log
function. Defaults to console
. See electron-log, a module that aggregates logs from main and renderer processes into a single file.notifyUser
Boolean (optional) - Defaults to true
. When enabled the user will be
prompted to apply the update immediately after download.For macOS, you'll need to build a .zip
file and include it in your GitHub Release.
Use electron-forge or electron-installer-zip to package your app as a zip.
For Windows, you'll need to build a .exe
file and include it in your GitHub Release.
Windows apps have an update process that requires multiple application restarts. You can use the electron-squirrel-startup module to improve this behavior.
Yes :)
MIT
If your app is packaged with electron-builder
, you may not need this module.
Builder has its own built-in mechanism for updating apps. Find out more at
electron.build/auto-update.
FAQs
A drop-in module that adds autoUpdating capabilities to Electron apps
We found that update-electron-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.